@extends('../layouts.base')      
@section('content')
<section class="Hui-article-box">
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
		<span class="c-gray en">&gt;</span>
		产品管理
		<span class="c-gray en">&gt;</span>
		添加产品<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a> </nav>
	<div class="Hui-article">
	<article class="cl pd-20">
      <form action="" method="post" class="form form-horizontal" id="submit-form">
		@csrf
		
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>商品分类：</label>
			<div class="formControls col-xs-6 col-sm-7">
				<span class="select-box">
				  <select class="select" size="1" name="cid">
				  	@foreach ($cateList as $item)
				    	<option value="{{$item->id}}">{{$item->title}}</option>
				    @endforeach	
				  </select>
				</span>
			</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>商品名称：</label>
			<div class="formControls col-xs-6 col-sm-7">
				<input type="text" class="input-text" value="" placeholder="请输入商品名称" id="title" name="title">
			</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>封面图：</label>
			<div class="formControls col-xs-6 col-sm-7">
				<span class="btn-upload">
				  <a href="javascript:void();" class="btn btn-primary radius btn-upload"><i class="Hui-iconfont">&#xe642;</i> 浏览文件</a>
				  <input type="file" name="file" class="input-file" id="file">
				</span>
				
				<img src="" id="img_src" style="width: 50px;height: 50px;display: none;"/>
				<input type="hidden" name="img_url" id='img_url' value=""/>
				<!--<input type="hidden" name="thumb" id='thumb' value=""/>-->
			</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>商品价格：</label>
			<div class="formControls col-xs-6 col-sm-7">
				<input type="text" class="input-text" value="" placeholder="请输入商品价格" id="price" name="price">
			</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>标准佣金：</label>
			<div class="formControls col-xs-6 col-sm-7">
				<input type="text" class="input-text" value="" placeholder="请输入标准佣金" id="standard_cash" name="standard_cash">
			</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>商品库存：</label>
			<div class="formControls col-xs-6 col-sm-7">
				<input type="text" class="input-text" value="" placeholder="请输入商品库存" id="inventory" name="inventory">
			</div>
		</div>
		
		<div class="skin-minimal row cl">
			<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>标本类型：</label>
			<div class="formControls col-xs-6 col-sm-7">
				
				@foreach ($styleList as $item)
					<div class="check-box">
					    <input name="style" type="checkbox" id="checkbox-{{$item->id}}" value="{{$item->id}}">
					    <label for="checkbox-{{$item->id}}">{{$item->name}}</label>
					</div>
				@endforeach
				
			</div>	
		</div>
		
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>排序：</label>
			<div class="formControls col-xs-6 col-sm-7">
				<input type="text" class="input-text" value="5" placeholder="请输入排序" id="sort" name="sort">
			</div>
		</div>
		
		<div class="skin-minimal row cl">
			<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>状态：</label>
			<div class="formControls col-xs-6 col-sm-7">
				<div class="radio-box skin-minimal">
				    <input type="radio" id="radio-1" name="updown" value="1" checked>
				    <label for="radio-1">上架</label>
				  </div>
				  <div class="radio-box">
				    <input type="radio" id="radio-2" name="updown" value="0">
				    <label for="radio-2">下架</label>
				 </div>
			</div>
		</div>
		
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2"><span class="c-red">*</span>商品简介：</label>
			<div class="formControls col-xs-6 col-sm-7">
				<textarea class="textarea" value="" placeholder="请输入商品简介"  name="simple_introduce"></textarea>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-2">图文详情：</label>
			<div class="formControls col-xs-6 col-sm-7"> 
				<script name="detail_introduce" id="editor" type="text/plain" style="width:100%;height:400px;"></script> 
			</div>
		</div>
		
		<div class="row cl">
		
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<input class="btn btn-primary radius" id="button-submit-add" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
	</article>
	</div>
</section>					
@endsection
 
 
@section('script')
<script type="text/javascript" src="/HadminPage/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="/HadminPage/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="/HadminPage/lib/jquery.validation/1.14.0/messages_zh.js"></script> 

<script type="text/javascript" src="/HadminPage/lib/webuploader/0.1.5/webuploader.min.js"></script> 
<script type="text/javascript" src="/HadminPage/lib/ueditor/1.4.3/ueditor.config.js"></script> 
<script type="text/javascript" src="/HadminPage/lib/ueditor/1.4.3/ueditor.all.min.js"> </script> 
<script type="text/javascript" src="/HadminPage/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
<script>
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	})
});
var ue = UE.getEditor('editor');

var SCOPE = {
    'save_url' : '/product/goods/add',
    'jump_url' : '/product/goods/index',
    'upload_url':'/product/goods/upload'
}
  
</script>
 @endsection		